import request from '@/utils/request'

// 获取分组列表
export function getExamSubgroups(groupId) {
  return request({
    url: `/exam/group/subgroup/list/${groupId}`,
    method: 'get'
  })
}

// 添加分组
export function addExamSubgroup(data) {
  return request({
    url: '/exam/group/subgroup',
    method: 'post',
    data: data
  })
}

// 更新分组
export function updateExamSubgroup(data) {
  return request({
    url: '/exam/group/subgroup',
    method: 'put',
    data: data
  })
}

// 删除分组
export function deleteExamSubgroup(ids) {
  return request({
    url: '/exam/group/subgroup',
    method: 'delete',
    data: ids
  })
}

// 获取分组成员
export function getGroupMembers(subgroupId) {
  return request({
    url: `/exam/group/subgroup/members/${subgroupId}`,
    method: 'get'
  })
}
// 获取分组成员列表
export function getSubgroupMembers(params) {
  return request({
    url: '/exam/group/subgroup/members2',
    method: 'get',
    params
  })
}
// 添加分组成员
export function addSubgroupMembers(data) {
  return request({
    url: '/exam/group/subgroup/members',
    method: 'post',
    data: data
  })
}



// 批量移除分组成员
export function removeSubgroupMembers(data) {
  return request({
    url: '/exam/group/subgroup/members',
    method: 'delete',
    data
  })
}
